let mongoose = require('mongoose')
mongoose.set('useFindAndModify', false)

mongoose.connect('mongodb+srv://root:kanglin0420@xkl-db.ovxi0.mongodb.net/xkl_api?retryWrites=true&w=majority', {useNewUrlParser: true,  useUnifiedTopology: true}, (err) => {
  if (err) {
    console.log(err)
    return
  }
  console.log('连接成功')
})

module.exports=mongoose
